<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>小米商城</title>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/type.css" />
		<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<style>

		</style>
	<script>
	
	function confir(money){
		  if(confirm("确认付款￥"+money+"？")){
        return true;//跳转
		  }else{
			event.preventDefault();
			return false;//不跳转
		}
	} 

	function condel(){
		  if(confirm("确认删除订单？")){
        return true;//跳转
		  }else{
			event.preventDefault();
			return false;//不跳转
		}
	} 
	</script>
	</head>
	<body>
	    <header>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-4 col-xs-3"></div>
				<div class="col-md-4 col-xs-6 text-center">
					<h2>我的订单</h2></div>
				<div class="col-md-4 col-xs-3"></div>
			</div>
			<div class="col-md-12 col-xs-12">
				<div class="col-md-1"></div>
				<div class="col-md-10 col-xs-12">
					<hr style="border: groove #ddd 1px;">
				</div>
				<div class="col-md-1"></div>
			</div>
		</header>
		<section>
		<neq name="orderitem" value="">
			<div class="col-md-12 col-xs-12">
				<div class="col-md-2"></div>
				<div class="col-md-8 col-xs-12 ">
					<div class="panel panel-default">
					<?php 
	for($i=0;$i<sizeof($orderitem);$i++){
echo '<div class="panel-heading">
<span class="index_span2">订单编号：'.$orderitem[$i]['OrderId'].'</span>

<a href="__CONTROLLER__/delOrder/OrderId/'.$orderitem[$i]['OrderId'].'" onclick="condel()"><button class="btn-primary" style="float:right">取消订单</button></a>
<a href="__CONTROLLER__/payorder/OrderId/'.$orderitem[$i]['OrderId'].'" onclick="confir('.$orderitem[$i]['TotalMoney'].')"><button class="btn-primary" style="float:right;margin-right:10px">付款</button></a>


</div>';

for($j=0;$j<sizeof($orders[$i]);$j++){
echo '
<a href="__MODULE__/Index/goods/gid/'.$orders[$i][$j]['GoodId'].'">
<div class="panel-body">
							<div class="col-md-3 col-xs-3">
								<img src="__PUBLIC__/uploads/img/'.$orders[$i][$j]['PictureUrl'].'" alt="" class="img-responsive" />
							</div>
							<div class="col-md-6 col-xs-6">
								<div class="order_span2">'.$orders[$i][$j]['GoodName'].'</div>
								<div class="order_span3">'.$orders[$i][$j]['Color'].'</div>
								<div class="order_span3">'.$orders[$i][$j]['Version'].'</div>
							</div>
							<div class="col-md-3 col-xs-3">
								<div class="order_span4"><sup>￥</sup>'.$orders[$i][$j]['Price'].'</div><br />
								<div class="order_span5">x'.$orders[$i][$j]['GoodCount'].'</div>
							</div>
						</div>
						</a>
						<hr />
';
}
echo "<br>";
							}



						?>
						
					</div>
				</div>
			</div>
			</neq>
			<eq name="orderitem" value=""><center><h2>没有待付款的订单，快去<a href="__APP__">采购</a>吧~</h2></center></eq>
		</section>
	
	</body>
</html>
